import lombok.Data;
import org.apache.commons.collections.CollectionUtils;

import java.util.List;
import java.util.Objects;
import java.util.Optional;

/**
 * @author : weixiang
 * create at:  2019-10-16
 * @description:
 */
public class ItemWeight {

    private Long itemId;
    private Long skuId;
    private Double weight;
    private Long minusNum;
    private List<Integer> list;

    public ItemWeight() {
    }

    public ItemWeight(Double weight) {
        this.weight = weight;
    }

    public ItemWeight(Long itemId, Long skuId, Double weight, Long minusNum) {
        this.itemId = itemId;
        this.skuId = skuId;
        this.weight = weight;
        this.minusNum = minusNum;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }


    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public Long getMinusNum() {
        return minusNum;
    }

    public String getKey() {
        return getItemId() + "_" + (null == getSkuId() || getSkuId()< 0  ? 0 : getSkuId());
    }

    public List<Integer> getList() {
        return list;
    }

    public void setList(List<Integer> list) {
        this.list = list;
    }


}
